package com.cf.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * boot-shop-Property
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/8/16 下午 04:12
 */
@Entity
@Table(name = "property")
@CModel(pages = {
        @CPage(title = "属性", path = "property", templateName = "list.ftl", outPutName = "list.ftl"),
        @CPage(title = "属性", path = "property", templateName = "add.ftl", outPutName = "add.ftl"),
        @CPage(title = "属性", path = "property", templateName = "update.ftl", outPutName = "update.ftl")
})
public class Property extends BaseEntity {


    /**
     * 属性的名字
     */
    @CField(lab = "名字")
    private String name;

    /**
     * 属性的类别
     */
    @CField(lab = "名字")
    private int type = PropertyType.INHERENT.getType();

    /**
     * 属性码
     */
    @CField(lab = "名字")
    private String code = "";

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
